home *** CD-ROM | disk | FTP | other *** search
/ Gamers Delight 2 / Gamers Delight 2.iso / Aminet / game / role / larn.lha / config.c < prev    next >
C/C++ Source or Header  |  1995-11-19  |  3KB  |  99 lines

  1. /*
  2.  *  config.c    --  This defines the installation dependent variables.
  3.  *                  Some strings are modified later.  ANSI C would
  4.  *                  allow compile time string concatenation, we must
  5.  *                  do runtime concatenation, in main.
  6.  */
  7. #include "header.h"
  8. #include "larndefs.h"
  9.  
  10. #ifndef LARNHOME
  11. #define LARNHOME "/usr/games/larn/"     /* normally supplied by a Makefile */
  12. #endif
  13.  
  14. #ifndef WIZID
  15. #define WIZID   0
  16. #endif
  17.  
  18. /*
  19.  *  All these strings will be appended to in main() to be complete filenames
  20.  */
  21.  
  22. # ifndef MSDOS
  23.         /* the game save filename   */
  24. char savefilename[SAVEFILENAMESIZE] =   LARNHOME;
  25.  
  26.         /* the score file           */
  27. char scorefile[sizeof(LARNHOME)+sizeof(SCORENAME)] =    LARNHOME;
  28.  
  29.         /* the logging file         */
  30. char logfile[sizeof(LARNHOME)+sizeof(LOGFNAME)]  =      LARNHOME;
  31.  
  32.         /* the help text file       */
  33. char helpfile[sizeof(LARNHOME)+sizeof(HELPNAME)] =      LARNHOME;
  34.  
  35.         /* the maze data file       */
  36. char larnlevels[sizeof(LARNHOME)+sizeof(LEVELSNAME)] =  LARNHOME;
  37.  
  38.         /* the fortune data file    */
  39. char fortfile[sizeof(LARNHOME)+sizeof(FORTSNAME)] =     LARNHOME;
  40.  
  41.         /* the .larnopts filename */
  42. char optsfile[128];             /* the option file          */
  43.  
  44.         /* the player id datafile name */
  45. char playerids[sizeof(LARNHOME)+sizeof(PLAYERIDS)] =    LARNHOME;
  46.  
  47. # ifdef TIMECHECK
  48.         /* the holiday datafile */
  49. char holifile[sizeof(LARNHOME)+sizeof(HOLIFILE)] =      LARNHOME;
  50. # endif
  51.  
  52. char ckpfile[sizeof(LARNHOME)+sizeof(CKPFILE)] = LARNHOME;
  53.  
  54. # ifdef EXTRA
  55. char diagfile[] ="Diagfile";        /* the diagnostic filename  */
  56. # endif
  57.  
  58. # else /* ndef MSDOS */
  59.  
  60. /* For MSDOS, use fixed length files because of a bug in sizeof.
  61.  */
  62. #   ifdef MSDOS
  63. /* Make LARNHOME readable from the larnopt file into a lardir variable.
  64.  */
  65. char savefilename[PATHLEN];
  66. char scorefile[PATHLEN];
  67. char logfile[PATHLEN];
  68. char helpfile[PATHLEN];
  69. char larnlevels[PATHLEN];
  70. char fortfile[PATHLEN];
  71. char optsfile[PATHLEN];
  72. char playerids[PATHLEN];
  73. char ckpfile[PATHLEN];
  74. char swapfile[PATHLEN];
  75. char larndir[DIRLEN]        = LARNHOME;
  76. #   else
  77. char savefilename[PATHLEN]  = LARNHOME;
  78. char scorefile[PATHLEN]     = LARNHOME;
  79. char logfile[PATHLEN]       = LARNHOME;
  80. char helpfile[PATHLEN]      = LARNHOME;
  81. char larnlevels[PATHLEN]    = LARNHOME;
  82. char fortfile[PATHLEN]      = LARNHOME;
  83. char optsfile[PATHLEN]      = LARNHOME;
  84. char playerids[PATHLEN]     = LARNHOME;
  85. char swapfile[PATHLEN]      = LARNHOME;
  86. char ckpfile[PATHLEN]       = LARNHOME;
  87. #   endif
  88. # endif /* ndef MSDOS */
  89.  
  90. char *password ="pvnert(x)";    /* the wizards password <=32*/
  91. #ifndef MSDOS
  92. #if WIZID == -1
  93. int wisid=0;            /* the user id of the only person who can be wizard */
  94. #else
  95. int wisid=WIZID;        /* the user id of the only person who can be wizard */
  96. #endif
  97. char psname[PSNAMESIZE]="larn"; /* the process name     */
  98. #endif MSDOS
  99.